import service from "@/utils/request"

import LoginWork from "@/utils/LoginWork"
// 待计算指令查询
export const ToBeInstructed = (parms:any) => {
    return service.post<any,any>(`/InstructionPackagingMaterial/getNotCountLotNoList`,parms)
}

// 已处理指令查询
export const RegeneratedInstructionUnitPrice = (parms:any) => {
    return service.post<any,any>(`/InstructionPackagingMaterial/getProcessedLotNoList`,parms)
}

// 指令包材明细查询
export const CommandPackageDetailsQuery = (parms:any) => {
    return service.post<any,any>(`/InstructionPackagingMaterial/getInstructionPackageDetails`,parms)
}

// 删除打勾材料
export const deleteTick = (parms:any) => {
    return LoginWork.post<any,any>(`/InstructionPackagingMaterial/deleteInstructionPackageDetails`,parms)
}

// 指令包材删除 整单
export const BlockDeletion = (lotNo:any) => {
    return LoginWork.get<any,any>(`/InstructionPackagingMaterial/deleteAllInstructionPackageDetails?lotNo=${lotNo}`)
}

// 添加包材
export const AddBlock = (parms:any) => {
    return LoginWork.post<any,any>(`/InstructionPackagingMaterial/addInstructionPackageDetails?lotNo=${parms.lotNo}`,parms)
}

// 生成物料编码
export const GeneratedMaterialCodingList = (parms:any) => {
    return LoginWork.post<any,any>(`/InstructionPackagingMaterial/makeMaterialCode`,parms)
}

// 打勾计算用量
export const TickToCalculateDosage = (parms:any) => {
    return LoginWork.post<any,any>(`/InstructionPackagingMaterial/calculatedConsumption`,parms)
}

// 置空物料编码
export const EmptyMaterialNumber = (parms:any) => {
    return LoginWork.post<any,any>(`/InstructionPackagingMaterial/makeMaterialCodeBeNull`,parms)
}

// 打勾复制材料
export const TickToCopyMaterial = (parms:any) => {
    return LoginWork.post<any,any>(`/InstructionPackagingMaterial/copyInstructionPackageDetails`,parms)
}

// 待料替换
export const MaterialReplacement = (parms:any) => {
    return LoginWork.post<any,any>(`/InstructionPackagingMaterial/updateClickDetails`,parms)
}

// 号码查询
export const sizeQuery = (style:string) => {
    return service.get<any,any>(`/InstructionPackagingMaterial/getSizeListByStyle?style=${style}`)
}

// 批量修改
export const batchModifying = (parms:any) => {
    return LoginWork.post<any,any>(`/InstructionPackagingMaterial/updateBatchInstructionPackageDetails`,parms)
}

// 批量添加包材
export const BatchAddPackagingMaterials = (lotNo:string,parms:any) => {
    return LoginWork.post<any,any>(`/InstructionPackagingMaterial/addBatchInstructionPackageDetails?lotNo=${lotNo}`,parms)
}

// 依托
export const DependentInstruction = (lotNo:any) => {
    return LoginWork.get<any,any>(`/InstructionPackagingMaterial/updateDate?lotNo=${lotNo}`)
}